package com.elder.business.mapper;

import java.util.List;
import com.elder.business.domain.ElderlyInfo;
import com.elder.business.domain.ElderlyStatisticsDTO;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;

/**
 * 老人信息Mapper接口
 * 
 * @author elder
 * @date 2023-11-26
 */
public interface ElderlyInfoMapper 
{
    /**
     * 查询老人信息
     * 
     * @param elderId 老人信息主键
     * @return 老人信息
     */
    public ElderlyInfo selectElderlyInfoById(@Param("elderId") Long elderId);

    /**
     * 查询老人信息列表
     * 
     * @param elderlyInfo 老人信息
     * @return 老人信息集合
     */
    public List<ElderlyInfo> selectElderlyInfoList(ElderlyInfo elderlyInfo);

    /**
     * 新增老人信息
     * 
     * @param elderlyInfo 老人信息
     * @return 结果
     */
    public int insertElderlyInfo(ElderlyInfo elderlyInfo);

    /**
     * 修改老人信息
     * 
     * @param elderlyInfo 老人信息
     * @return 结果
     */
    public int updateElderlyInfo(ElderlyInfo elderlyInfo);

    /**
     * 删除老人信息
     * 
     * @param id 老人信息主键
     * @return 结果
     */
    public int deleteElderlyInfoById(Long id);

    /**
     * 批量删除老人信息
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteElderlyInfoByIds(Long[] ids);

    public List<ElderlyInfo> getAllElderList();

    public List<ElderlyInfo> getElderInfoByElderIds(@Param("elderIds") List<Long> elderIds);

    public ElderlyStatisticsDTO getApartmentStatistics();

    int insertBatchElderlyInfo(List<ElderlyInfo> list);

    public List<ElderlyInfo> getAllElderInfoList();

    public ElderlyInfo getElderInfoByElderId(@Param("elderId") Long elderId);

    List<ElderlyInfo> getElderinfoList(@Param("elderName") String elderName);

    List<ElderlyInfo> getTodayJoinElderInfo(@Param("startTime") Long startTime,@Param("endTime")  Long endTime);

    List<ElderlyInfo> getElderList(@Param("elderName") String elderName);
}
